<template>
  <div style="width: calc(100vw); height: calc(100vh); background: linear-gradient(rgb(19, 20, 39), rgb(42, 44, 80)); overflow: auto;" class="invisible-scrollbar">
    <div style="width: 100%; display: flex; flex-direction: column; justify-content: flex-start; align-items: flex-start; position: relative;">
      <!-- 标题开始 -->
      <!-- <div :style="{ height: (230 / 96) + 'rem' }"></div> -->
      <div ref="matchTitleElement" style="width: 100%; display: flex; flex-direction: column; justify-content: flex-start; align-items: center; background: rgb(12, 12, 24); position: relative; top: 0rem; left: 0rem; z-index: 1;" :style="{ height: (230 / 96) + 'rem' }">
        <div :style="{width: '7%', height: (108 / 96) + 'rem', position: 'absolute', top: '0rem', left: '0rem', display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center'}">
          <div :style="{width: '100%', display: 'flex', flexDirection: 'column', justifyContent: 'center', alignItems: 'center', cursor: 'pointer'}" @click="goBackClick">
            <img :style="{width: (50 / 96) + 'rem', height: (50 / 96) + 'rem'}" src="../../../static/match-backs.png" />
          </div>
        </div>
        <div style="width: 86%; display: flex; flex-direction: row; justify-content: space-between; align-items: center;" ref="teamElement">
          <div :style="{ width: '45%', height: (80 / 96) + 'rem' }" style="display: flex; flex-direction: row; justify-content: flex-start; align-items: center;">
            <span :style="{ fontSize: (39 / 96) + 'rem', lineHeight: (50 / 96) + 'rem', textOverflow: '-o-ellipsis-lastline', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', '-webkitLineClamp': 2, 'lineClamp': 2, '-webkitBoxOrient': 'vertical' }" style="font-family: SimSun; font-weight: 400; color: #FFFFFF;"></span>
          </div>
          <div :style="{ width: '45%', height: (80 / 96) + 'rem' }" style="display: flex; flex-direction: row; justify-content: flex-end; align-items: center;">
            <span :style="{ fontSize: (39 / 96) + 'rem', lineHeight: (50 / 96) + 'rem', textOverflow: '-o-ellipsis-lastline', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', '-webkitLineClamp': 2, 'lineClamp': 2, '-webkitBoxOrient': 'vertical' }" style="font-family: SimSun; font-weight: 400; color: #FFFFFF;"></span>
          </div>
        </div>
        <div style="width: 86%; display: flex; flex-direction: row; justify-content: center; align-items: center;" ref="teamElement">
          <div :style="{ width: '45%' }" style="display: flex; flex-direction: row; justify-content: flex-end; align-items: center;">
            <div :style="{ width: (120 / 96) + 'rem', height: (120 / 96) + 'rem' }">
              <img :style="{ width: (120 / 96) + 'rem', height: (120 / 96) + 'rem', borderRadius: '100%' }" :src="homePlayerImg" />
            </div>
            <div :style="{ width: '40%', marginLeft: (20 / 96) + 'rem' }" style="display: flex; flex-direction: column; justify-content: center; align-items: flex-start; cursor: pointer;">
              <span :style="{ fontSize: (60 / 96) + 'rem' }" style="font-family: Microsoft YaHei; font-weight: bold; color: #FFFFFF;">{{ homePlayerName }}</span>
            </div>
          </div>
          <div style="width: 10%; display: flex; flex-direction: column; justify-content: center; align-items: center;">
            <span :style="{ fontSize: (60 / 96) + 'rem', textOverflow: '-o-ellipsis-lastline', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', '-webkitLineClamp': 1, 'lineClamp': 1, '-webkitBoxOrient': 'vertical' }" style="font-family: SimSun; font-weight: bold; color: #FFFFFF;">VS</span>
          </div>
          <div :style="{ width: '45%' }" style="display: flex; flex-direction: row; justify-content: flex-start; align-items: center;">
            <div :style="{ width: '40%', marginRight: (20 / 96) + 'rem' }" style="display: flex; flex-direction: column; justify-content: center; align-items: flex-end; cursor: pointer;">
              <span :style="{ fontSize: (60 / 96) + 'rem' }" style="font-family: Microsoft YaHei; font-weight: bold; color: #FFFFFF;">{{ awayPlayerName }}</span>
            </div>
            <div :style="{ width: (120 / 96) + 'rem', height: (120 / 96) + 'rem' }">
              <img :style="{ width: (120 / 96) + 'rem', height: (120 / 96) + 'rem', borderRadius: '100%' }" :src="awayPlayerImg" />
            </div>
          </div>
        </div>
      </div>
      <!-- 标题结束 -->
      <!-- 球队名称开始 -->
      <div style="width: 100%; display: flex; flex-direction: row; justify-content: center; align-items: flex-start;" :style="{ marginTop: (28 / 96) + 'rem', marginBottom: (28 / 96) + 'rem' }">
        <div style="width: 86%; display: flex; flex-direction: row; justify-content: space-between; align-items: center;">
          <div :style="{ width: '43%' }" style="display: flex; flex-direction: row; justify-content: flex-start; align-items: center;">
            <span :style="{ fontSize: (39 / 96) + 'rem', lineHeight: (50 / 96) + 'rem', textOverflow: '-o-ellipsis-lastline', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', '-webkitLineClamp': 2, 'lineClamp': 2, '-webkitBoxOrient': 'vertical' }" style="font-family: SimSun; font-weight: 400; color: #FFFFFF;">{{ homeTeamName }}</span>
          </div>
          <div :style="{ width: '43%' }" style="display: flex; flex-direction: row; justify-content: flex-end; align-items: center;">
            <span :style="{ fontSize: (39 / 96) + 'rem', lineHeight: (50 / 96) + 'rem', textOverflow: '-o-ellipsis-lastline', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', '-webkitLineClamp': 2, 'lineClamp': 2, '-webkitBoxOrient': 'vertical' }" style="font-family: SimSun; font-weight: 400; color: #FFFFFF;">{{ awayTeamName }}</span>
          </div>
        </div>
      </div>
      <!-- 球队名称结束 -->
      <!-- 球员对比开始 -->
      <div style="width: 100%; display: flex; flex-direction: column; justify-content: flex-start; align-items: center;" :style="{ marginBottom: (0 / 96) + 'rem' }">
        <div style="width: 96%; display: flex; flex-direction: row; justify-content: center; align-items: flex-start;">
          <div style="width: 20%; display: flex; flex-direction: column; justify-content: center; align-items: flex-start;" :style="{ marginBottom: (20 / 96) + 'rem' }">
            <div style="width: 80%;" ref="homeElement">
              <div style="width: 100%; display: flex; flex-direction: row; justify-content: flex-start; align-items: center;" :style="{ height: (80 / 96) + 'rem' }" v-for="(item, index) in homeTeamData" :key="'home' + index" @click="selectHomeClick(index)">
                <div style="height: 100%; display: flex; flex-direction: row; justify-content: flex-start; align-items: center;" :style="{ width: homeElementWidth - jiantouHomeElementWidth + 'px', backgroundColor: typeHomeIndex == index ? 'rgb(12, 12, 24)' : '' }">
                  <div style="width: 28%; display: flex; flex-direction: row; justify-content: center; align-items: center;">
                    <span :style="{ fontSize: (28 / 96) + 'rem', lineHeight: (50 / 96) + 'rem', textOverflow: '-o-ellipsis-lastline', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', '-webkitLineClamp': 2, 'lineClamp': 2, '-webkitBoxOrient': 'vertical' }" style="font-family: SimSun; font-weight: 400; color: #FFFFFF;">{{ item.playerNum }}</span>
                  </div>
                  <div style="width: 72%; display: flex; flex-direction: row; justify-content: flex-start; align-items: center;">
                    <span :style="{ fontSize: (28 / 96) + 'rem', lineHeight: (50 / 96) + 'rem', textOverflow: '-o-ellipsis-lastline', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', '-webkitLineClamp': 2, 'lineClamp': 2, '-webkitBoxOrient': 'vertical' }" style="font-family: SimSun; font-weight: 400; color: #FFFFFF;">{{ item.playerName }}</span>
                  </div>
                </div>
                <div v-if="typeHomeIndex == index" ref="jiantouHomeElement" :style="{ width: 0, height: 0, borderTop: (40 / 96) + 'rem solid transparent', borderLeft: (80 / 96) + 'rem solid rgb(12, 12, 24)', borderBottom: (40 / 96) + 'rem solid transparent' }"></div>
              </div>
            </div>
          </div>
          <div style="width: 60%; display: flex; flex-direction: column; justify-content: center; align-items: center;">
            <div style="width: 100%; display: flex; flex-direction: row; justify-content: center; align-items: center;" :style="{ marginBottom: (20 / 96) + 'rem' }" v-for="(item, index) in teamInfoList" :key="index">
              <div style="width: 45%; display: flex; flex-direction: row; justify-content: flex-start; align-items: center;">
                <div :style="{ width: '20%' }" style="display: flex; flex-direction: row; justify-content: center; align-items: center;">
                  <span v-if="index > 2" :style="{ fontSize: (28 / 96) + 'rem', lineHeight: (50 / 96) + 'rem', textOverflow: '-o-ellipsis-lastline', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', '-webkitLineClamp': 2, 'lineClamp': 2, '-webkitBoxOrient': 'vertical' }" style="font-family: SimSun; font-weight: 400; color: #FFFFFF;">{{item.leftTeamNum}}</span>
                  <span v-if="index <= 2" :style="{ fontSize: (28 / 96) + 'rem', lineHeight: (50 / 96) + 'rem', textOverflow: '-o-ellipsis-lastline', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', '-webkitLineClamp': 2, 'lineClamp': 2, '-webkitBoxOrient': 'vertical' }" style="font-family: SimSun; font-weight: 400; color: #FFFFFF;">{{statisticalModel == 1 ? item.leftTeamNum : (item.leftTeamAllNum != 0 ? (item.leftTeamNum / item.leftTeamAllNum * 100).toFixed(1) + "%" : "0.0%")}}</span>
                </div>
                <div :style="{ width: '80%' }" style="display: flex; flex-direction: row; justify-content: center; align-items: center;">
                  <div v-if="index > 2" :style="{ width: '100%', height: (50 / 96) + 'rem', background: 'rgb(12, 12, 24)', display: 'flex', flexDirection: 'row', justifyContent: 'flex-end', alignItems: 'center', position: 'relative' }">
                    <div :style="{ width: item.leftTeamNum / (item.leftTeamAllNum != 0 ? item.leftTeamAllNum : 1) * 100 + '%', height: (48 / 96) + 'rem', background: '#5DAC81', position: 'absolute', right: '0rem' }"></div>
                  </div>
                  <div v-if="index <= 2" :style="{ width: '100%', height: (50 / 96) + 'rem', background: 'rgb(12, 12, 24)', display: 'flex', flexDirection: 'row', justifyContent: 'flex-end', alignItems: 'center', position: 'relative' }">
                    <div :style="{ width: item.leftTeamNum / (item.leftTeamAllNum != 0 ? item.leftTeamAllNum : 1) * 100 + '%', height: (48 / 96) + 'rem', background: '#5DAC81', position: 'absolute', right: '0rem' }"></div>
                  </div>
                </div>
              </div>
              <div style="width: 10%; display: flex; flex-direction: row; justify-content: center; align-items: center;">
                <div :style="{ width: '100%' }" style="display: flex; flex-direction: row; justify-content: center; align-items: center;">
                  <span :style="{ fontSize: (28 / 96) + 'rem', lineHeight: (40 / 96) + 'rem', textOverflow: '-o-ellipsis-lastline', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', '-webkitLineClamp': 2, 'lineClamp': 2, '-webkitBoxOrient': 'vertical' }" style="font-family: SimSun; font-weight: 400; color: #FFFFFF;">{{ item.title }}</span>
                </div>
              </div>
              <div style="width: 45%; display: flex; flex-direction: row; justify-content: flex-end; align-items: center;">
                <div :style="{ width: '80%' }" style="display: flex; flex-direction: row; justify-content: center; align-items: center;">
                  <div v-if="index > 2" :style="{ width: '100%', height: (50 / 96) + 'rem', background: 'rgb(12, 12, 24)', display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', position: 'relative' }">
                    <div :style="{ width: item.rightTeamNum / (item.rightTeamAllNum != 0 ? item.rightTeamAllNum : 1) * 100 + '%', height: (48 / 96) + 'rem', background: '#5DAC81', position: 'absolute', left: '0rem' }"></div>
                  </div>
                  <div v-if="index <= 2" :style="{ width: '100%', height: (50 / 96) + 'rem', background: 'rgb(12, 12, 24)', display: 'flex', flexDirection: 'row', justifyContent: 'flex-start', alignItems: 'center', position: 'relative' }">
                    <div :style="{ width: item.rightTeamNum / (item.rightTeamAllNum != 0 ? item.rightTeamAllNum : 1) * 100 + '%', height: (48 / 96) + 'rem', background: '#5DAC81', position: 'absolute', left: '0rem' }"></div>
                  </div>
                </div>
                <div :style="{ width: '20%' }" style="display: flex; flex-direction: row; justify-content: center; align-items: center;">
                  <span v-if="index > 2" :style="{ fontSize: (28 / 96) + 'rem', lineHeight: (50 / 96) + 'rem', textOverflow: '-o-ellipsis-lastline', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', '-webkitLineClamp': 2, 'lineClamp': 2, '-webkitBoxOrient': 'vertical' }" style="font-family: SimSun; font-weight: 400; color: #FFFFFF;">{{item.rightTeamNum}}</span>
                  <span v-if="index <= 2" :style="{ fontSize: (28 / 96) + 'rem', lineHeight: (50 / 96) + 'rem', textOverflow: '-o-ellipsis-lastline', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', '-webkitLineClamp': 2, 'lineClamp': 2, '-webkitBoxOrient': 'vertical' }" style="font-family: SimSun; font-weight: 400; color: #FFFFFF;">{{statisticalModel == 1 ? item.rightTeamNum : (item.rightTeamAllNum != 0 ? (item.rightTeamNum / item.rightTeamAllNum * 100).toFixed(1) + "%" : "0.0%")}}</span>
                </div>
              </div>
            </div>
          </div>
          <div style="width: 20%; display: flex; flex-direction: column; justify-content: center; align-items: flex-end;" :style="{ marginBottom: (20 / 96) + 'rem' }">
            <div style="width: 80%;" ref="awayElement">
              <div style="width: 100%; display: flex; flex-direction: row; justify-content: flex-end; align-items: center;" :style="{ height: (80 / 96) + 'rem' }" v-for="(item, index) in awayTeamData" :key="'away' + index" @click="selectAwayClick(index)">
                <div v-if="typeAwayIndex == index" ref="jiantouAwayElement" :style="{ width: 0, height: 0, borderTop: (40 / 96) + 'rem solid transparent', borderRight: (80 / 96) + 'rem solid rgb(12, 12, 24)', borderBottom: (40 / 96) + 'rem solid transparent' }"></div>
                <div style="height: 100%; display: flex; flex-direction: row; justify-content: flex-end; align-items: center;" :style="{ width: awayElementWidth - jiantouAwayElementWidth + 'px', backgroundColor: typeAwayIndex == index ? 'rgb(12, 12, 24)' : '' }">
                  <div style="width: 72%; display: flex; flex-direction: row; justify-content: flex-end; align-items: center;">
                    <span :style="{ fontSize: (28 / 96) + 'rem', lineHeight: (50 / 96) + 'rem', textOverflow: '-o-ellipsis-lastline', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', '-webkitLineClamp': 2, 'lineClamp': 2, '-webkitBoxOrient': 'vertical' }" style="font-family: SimSun; font-weight: 400; color: #FFFFFF;">{{ item.playerName }}</span>
                  </div>
                  <div style="width: 28%; display: flex; flex-direction: row; justify-content: center; align-items: center;">
                    <span :style="{ fontSize: (28 / 96) + 'rem', lineHeight: (50 / 96) + 'rem', textOverflow: '-o-ellipsis-lastline', overflow: 'hidden', textOverflow: 'ellipsis', display: '-webkit-box', '-webkitLineClamp': 2, 'lineClamp': 2, '-webkitBoxOrient': 'vertical' }" style="font-family: SimSun; font-weight: 400; color: #FFFFFF;">{{ item.playerNum }}</span>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </div>
      <!-- 球员对比结束 -->
    </div>
  </div>
</template>

<script>
  import  {pageResize} from '../../utils/resetScreenSize.js'
  export default {
    name: 'MatchInfos',
    components: {

    },
    data () {
      return {
        countDown: true,
        matchTitle: "",
        homeTeamName: "",
        awayTeamName: "",
        homePlayerName: "",
        awayPlayerName: "",
        homePlayerImg: "",
        awayPlayerImg: "",
        minute: "06",
        second: "22",
        millisecond: "55",
        homeTeamScorce: 0,
        awayTeamScorce: 0,
        homeTeamSuspendNum: 2,
        awayTeamSuspendNum: 3,
        homeTeamfoulNum: 2,
        awayTeamfoulNum: 3,
        i: 0,
        teamInfoList: [
          {
            title: "二分%",
            leftTeamNum: 50,
            rightTeamNum: 50,
            leftTeamAllNum: 50,
            rightTeamAllNum: 50
          },
          {
            title: "三分%",
            leftTeamNum: 4,
            rightTeamNum: 4,
            leftTeamAllNum: 4,
            rightTeamAllNum: 4
          },
          {
            title: "罚球%",
            leftTeamNum: 10,
            rightTeamNum: 16,
            leftTeamAllNum: 10,
            rightTeamAllNum: 20
          },
          {
            title: "篮板",
            leftTeamNum: 50,
            rightTeamNum: 50,
            leftTeamAllNum: 50,
            rightTeamAllNum: 50
          },
          {
            title: "前板",
            leftTeamNum: 30,
            rightTeamNum: 14,
            leftTeamAllNum: 30,
            rightTeamAllNum: 20
          },
          {
            title: "后板",
            leftTeamNum: 0,
            rightTeamNum: 0,
            leftTeamAllNum: 0,
            rightTeamAllNum: 0
          },
          {
            title: "盖帽",
            leftTeamNum: 4,
            rightTeamNum: 4,
            leftTeamAllNum: 4,
            rightTeamAllNum: 4
          },
          {
            title: "助攻",
            leftTeamNum: 10,
            rightTeamNum: 16,
            leftTeamAllNum: 10,
            rightTeamAllNum: 20
          },
          {
            title: "抢断",
            leftTeamNum: 30,
            rightTeamNum: 14,
            leftTeamAllNum: 30,
            rightTeamAllNum: 20
          },
          {
            title: "失误",
            leftTeamNum: 0,
            rightTeamNum: 0,
            leftTeamAllNum: 0,
            rightTeamAllNum: 0
          },
          {
            title: "犯规",
            leftTeamNum: 12,
            rightTeamNum: 8,
            leftTeamAllNum: 12,
            rightTeamAllNum: 20
          },
          // {
          //   title: "效率",
          //   leftTeamNum: 12,
          //   rightTeamNum: 8,
          //   leftTeamAllNum: 12,
          //   rightTeamAllNum: 20
          // }
        ],
        model: 0, // [赛制模式]{1:斗牛;2:2V2;3:3V3;4:4V4;5:5V5;}
        statisticalModel: 1, // [统计模式]{1:标准模式;2:专业模式;3:职业模式;}
        mainHeight: 0,
        homeTeamData: [],
        awayTeamData: [],
        type: "",
        typeHomeIndex: 4,
        typeAwayIndex: 4,
        totalpts: 0,
        totalrebs: 0,
        totalasts: 0,
        totalstls: 0,
        totalblks: 0,
        totaltwoPs: 0,
        totaltwoPsMiss: 0,
        totalthreePs: 0,
        totalthreePsMiss: 0,
        totalonePs: 0,
        totalonePsMiss: 0,
        totaltos: 0,
        totalfouls: 0,
        totalfts: 0,
        totalftsMiss: 0,
        totaloff: 0,
        totaldef: 0,
        totaleff: 0,
        awaytotalpts: 0,
        awaytotalrebs: 0,
        awaytotalasts: 0,
        awaytotalstls: 0,
        awaytotalblks: 0,
        awaytotaltwoPs: 0,
        awaytotaltwoPsMiss: 0,
        awaytotalthreePs: 0,
        awaytotalthreePsMiss: 0,
        awaytotalonePs: 0,
        awaytotalonePsMiss: 0,
        awaytotaltos: 0,
        awaytotalfouls: 0,
        awaytotalfts: 0,
        awaytotalftsMiss: 0,
        awaytotaloff: 0,
        awaytotaldef: 0,
        awaytotaleff: 0,
        homeElementWidth: 0,
        jiantouHomeElementWidth: 0,
        awayElementWidth: 0,
        jiantouAwayElementWidth: 0
      }
    },
    mounted() {
      pageResize();
      // setInterval(this.myFunction, 1000 * 5);
    },
    methods: {
      myFunction() {
        this.i = this.i + 1;
        // console.log("轮训任务=================>" + this.i);
        //这里写自己的ajax请求访问后台就可以了
      },
      selectMatchVo(id) {
        let jsons = {
          id: id
        };
        this.$http.post('/competition/selectCompetitionData', jsons).then((res) => {
          if(res.code == 200) {
            let playerDataItem = [];
            let awayPlayerDataItem = [];
            this.homeTeamName = res.data.homeTeamName;
            this.awayTeamName = res.data.awayTeamName;
            this.matchTitle = res.data.leagueInfo.leagueName;
            this.homeTeamImg = res.data.homeTeamStatistics.teamInfo.teamLogo ? res.data.homeTeamStatistics.teamInfo.teamLogo : "../../static/league_match_logo.png";
            this.awayTeamImg = res.data.awayTeamStatistics.teamInfo.teamLogo ? res.data.awayTeamStatistics.teamInfo.teamLogo : "../../static/league_match_logo.png";
            this.homeTeamScorce = res.data.homeTeamScore;
            this.awayTeamScorce = res.data.awayTeamScore;
            this.model = res.data.leagueInfo.model;
            this.statisticalModel = res.data.statisticalModel;
            let totalpts = 0,
            totalrebs = 0,
            totalasts = 0,
            totalstls = 0,
            totalblks = 0,
            totaltwoPs = 0,
            totaltwoPsMiss = 0,
            totalthreePs = 0,
            totalthreePsMiss = 0,
            totalonePs = 0,
            totalonePsMiss = 0,
            totaltos = 0,
            totalfouls = 0,
            totalfts = 0,
            totalftsMiss = 0,
            totaloff = 0,
            totaldef = 0,
            totaleff = 0;
            let awaytotalpts = 0,
            awaytotalrebs = 0,
            awaytotalasts = 0,
            awaytotalstls = 0,
            awaytotalblks = 0,
            awaytotaltwoPs = 0,
            awaytotaltwoPsMiss = 0,
            awaytotalthreePs = 0,
            awaytotalthreePsMiss = 0,
            awaytotalonePs = 0,
            awaytotalonePsMiss = 0,
            awaytotaltos = 0,
            awaytotalfouls = 0,
            awaytotalfts = 0,
            awaytotalftsMiss = 0,
            awaytotaloff = 0,
            awaytotaldef = 0,
            awaytotaleff = 0;
            for(let i=0;i<res.data.homeTeamPlayerStatistics.length;i++) {
              // if(res.data.homeTeamPlayerStatistics[i].playerInfo) {
                playerDataItem.push({
                  teamName: this.homeTeamName,
                  id: res.data.homeTeamPlayerStatistics[i].playerInfo ? res.data.homeTeamPlayerStatistics[i].playerInfo.playerId : "",
                  face: res.data.homeTeamPlayerStatistics[i].playerInfo ? (res.data.homeTeamPlayerStatistics[i].playerInfo.face ? res.data.homeTeamPlayerStatistics[i].playerInfo.face : "../../../static/user_head_default.png") : "../../../static/user_head_default.png",
                  playerNum: res.data.homeTeamPlayerStatistics[i].playerInfo ? res.data.homeTeamPlayerStatistics[i].playerInfo.number : "",
                  playerName: res.data.homeTeamPlayerStatistics[i].playerInfo ? res.data.homeTeamPlayerStatistics[i].playerInfo.name : "其他",
                  pts: res.data.homeTeamPlayerStatistics[i].pts, // 得分
                  rebs: res.data.homeTeamPlayerStatistics[i].rebs, // 篮板
                  asts: res.data.homeTeamPlayerStatistics[i].asts, // 助攻
                  stls: res.data.homeTeamPlayerStatistics[i].stls, // 抢断
                  blks: res.data.homeTeamPlayerStatistics[i].blks, // 盖帽
                  twoPs: res.data.homeTeamPlayerStatistics[i].twoPs, // 二分球命中
                  twoPsMiss: res.data.homeTeamPlayerStatistics[i].twoPsMiss, // 二分球不中
                  threePs: res.data.homeTeamPlayerStatistics[i].threePs, // 三分球命中
                  threePsMiss: res.data.homeTeamPlayerStatistics[i].threePsMiss, // 三分球不中
                  onePs: res.data.homeTeamPlayerStatistics[i].onePs, // 一分球命中
                  onePsMiss: res.data.homeTeamPlayerStatistics[i].onePsMiss, // 一分球不中
                  tos: res.data.homeTeamPlayerStatistics[i].tos, // 失误
                  fouls: res.data.homeTeamPlayerStatistics[i].fouls, // 犯规
                  fts: res.data.homeTeamPlayerStatistics[i].fts, // 罚球命中
                  ftsMiss: res.data.homeTeamPlayerStatistics[i].ftsMiss, // 罚球不中
                  off: res.data.homeTeamPlayerStatistics[i].off, // 前板
                  def: res.data.homeTeamPlayerStatistics[i].def, // 后板
                  eff: res.data.homeTeamPlayerStatistics[i].eff, // 效率
                  onePsBfb: (res.data.homeTeamPlayerStatistics[i].onePs + res.data.homeTeamPlayerStatistics[i].onePsMiss) != 0 ? res.data.homeTeamPlayerStatistics[i].onePs/(res.data.homeTeamPlayerStatistics[i].onePs + res.data.homeTeamPlayerStatistics[i].onePsMiss) : 0,
                  twoPsBfb: (res.data.homeTeamPlayerStatistics[i].twoPs + res.data.homeTeamPlayerStatistics[i].twoPsMiss) != 0 ? res.data.homeTeamPlayerStatistics[i].twoPs/(res.data.homeTeamPlayerStatistics[i].twoPs + res.data.homeTeamPlayerStatistics[i].twoPsMiss) : 0,
                  threePsBfb: (res.data.homeTeamPlayerStatistics[i].threePs + res.data.homeTeamPlayerStatistics[i].threePsMiss) != 0 ? res.data.homeTeamPlayerStatistics[i].threePs/(res.data.homeTeamPlayerStatistics[i].threePs + res.data.homeTeamPlayerStatistics[i].threePsMiss) : 0,
                  ftsBfb: (res.data.homeTeamPlayerStatistics[i].fts + res.data.homeTeamPlayerStatistics[i].ftsMiss) != 0 ? res.data.homeTeamPlayerStatistics[i].fts/(res.data.homeTeamPlayerStatistics[i].fts + res.data.homeTeamPlayerStatistics[i].ftsMiss) : 0
                });
                totalpts += res.data.homeTeamPlayerStatistics[i].pts;
                totalrebs += res.data.homeTeamPlayerStatistics[i].rebs;
                totalasts += res.data.homeTeamPlayerStatistics[i].asts;
                totalstls += res.data.homeTeamPlayerStatistics[i].stls;
                totalblks += res.data.homeTeamPlayerStatistics[i].blks;
                totaltwoPs += res.data.homeTeamPlayerStatistics[i].twoPs;
                totaltwoPsMiss += res.data.homeTeamPlayerStatistics[i].twoPsMiss;
                totalthreePs += res.data.homeTeamPlayerStatistics[i].threePs;
                totalthreePsMiss += res.data.homeTeamPlayerStatistics[i].threePsMiss;
                totalonePs += res.data.homeTeamPlayerStatistics[i].onePs;
                totalonePsMiss += res.data.homeTeamPlayerStatistics[i].onePsMiss;
                totaltos += res.data.homeTeamPlayerStatistics[i].tos;
                totalfouls += res.data.homeTeamPlayerStatistics[i].fouls;
                totalfts += res.data.homeTeamPlayerStatistics[i].fts;
                totalftsMiss += res.data.homeTeamPlayerStatistics[i].ftsMiss;
                totaloff += res.data.homeTeamPlayerStatistics[i].off;
                totaldef += res.data.homeTeamPlayerStatistics[i].def;
                totaleff += res.data.homeTeamPlayerStatistics[i].eff;
              // }
            }
            for(let i=0;i<res.data.awayTeamPlayerStatistics.length;i++) {
              // if(res.data.awayTeamPlayerStatistics[i].playerInfo) {
                awayPlayerDataItem.push({
                  teamName: this.awayTeamName,
                  id: res.data.awayTeamPlayerStatistics[i].playerInfo ? res.data.awayTeamPlayerStatistics[i].playerInfo.playerId : "",
                  face: res.data.awayTeamPlayerStatistics[i].playerInfo ? (res.data.awayTeamPlayerStatistics[i].playerInfo.face ? res.data.awayTeamPlayerStatistics[i].playerInfo.face : "../../../static/user_head_default.png") : "../../../static/user_head_default.png",
                  playerNum: res.data.awayTeamPlayerStatistics[i].playerInfo ? res.data.awayTeamPlayerStatistics[i].playerInfo.number : "",
                  playerName: res.data.awayTeamPlayerStatistics[i].playerInfo ? res.data.awayTeamPlayerStatistics[i].playerInfo.name : "其他",
                  pts: res.data.awayTeamPlayerStatistics[i].pts, // 得分
                  rebs: res.data.awayTeamPlayerStatistics[i].rebs, // 篮板
                  asts: res.data.awayTeamPlayerStatistics[i].asts, // 助攻
                  stls: res.data.awayTeamPlayerStatistics[i].stls, // 抢断
                  blks: res.data.awayTeamPlayerStatistics[i].blks, // 盖帽
                  twoPs: res.data.awayTeamPlayerStatistics[i].twoPs, // 二分球命中
                  twoPsMiss: res.data.awayTeamPlayerStatistics[i].twoPsMiss, // 二分球不中
                  threePs: res.data.awayTeamPlayerStatistics[i].threePs, // 三分球命中
                  threePsMiss: res.data.awayTeamPlayerStatistics[i].threePsMiss, // 三分球不中
                  onePs: res.data.awayTeamPlayerStatistics[i].onePs, // 一分球命中
                  onePsMiss: res.data.awayTeamPlayerStatistics[i].onePsMiss, // 一分球不中
                  tos: res.data.awayTeamPlayerStatistics[i].tos, // 失误
                  fouls: res.data.awayTeamPlayerStatistics[i].fouls, // 犯规
                  fts: res.data.awayTeamPlayerStatistics[i].fts, // 罚球命中
                  ftsMiss: res.data.awayTeamPlayerStatistics[i].ftsMiss, // 罚球不中
                  off: res.data.awayTeamPlayerStatistics[i].off, // 前板
                  def: res.data.awayTeamPlayerStatistics[i].def, // 后板
                  eff: res.data.awayTeamPlayerStatistics[i].eff, // 效率
                  onePsBfb: (res.data.awayTeamPlayerStatistics[i].onePs + res.data.awayTeamPlayerStatistics[i].onePsMiss) != 0 ? res.data.awayTeamPlayerStatistics[i].onePs/(res.data.awayTeamPlayerStatistics[i].onePs + res.data.awayTeamPlayerStatistics[i].onePsMiss) : 0,
                  twoPsBfb: (res.data.awayTeamPlayerStatistics[i].twoPs + res.data.awayTeamPlayerStatistics[i].twoPsMiss) != 0 ? res.data.awayTeamPlayerStatistics[i].twoPs/(res.data.awayTeamPlayerStatistics[i].twoPs + res.data.awayTeamPlayerStatistics[i].twoPsMiss) : 0,
                  threePsBfb: (res.data.awayTeamPlayerStatistics[i].threePs + res.data.awayTeamPlayerStatistics[i].threePsMiss) != 0 ? res.data.awayTeamPlayerStatistics[i].threePs/(res.data.awayTeamPlayerStatistics[i].threePs + res.data.awayTeamPlayerStatistics[i].threePsMiss) : 0,
                  ftsBfb: (res.data.awayTeamPlayerStatistics[i].fts + res.data.awayTeamPlayerStatistics[i].ftsMiss) != 0 ? res.data.awayTeamPlayerStatistics[i].fts/(res.data.awayTeamPlayerStatistics[i].fts + res.data.awayTeamPlayerStatistics[i].ftsMiss) : 0
                });
                awaytotalpts += res.data.awayTeamPlayerStatistics[i].pts;
                awaytotalrebs += res.data.awayTeamPlayerStatistics[i].rebs;
                awaytotalasts += res.data.awayTeamPlayerStatistics[i].asts;
                awaytotalstls += res.data.awayTeamPlayerStatistics[i].stls;
                awaytotalblks += res.data.awayTeamPlayerStatistics[i].blks;
                awaytotaltwoPs += res.data.awayTeamPlayerStatistics[i].twoPs;
                awaytotaltwoPsMiss += res.data.awayTeamPlayerStatistics[i].twoPsMiss;
                awaytotalthreePs += res.data.awayTeamPlayerStatistics[i].threePs;
                awaytotalthreePsMiss += res.data.awayTeamPlayerStatistics[i].threePsMiss;
                awaytotalonePs += res.data.awayTeamPlayerStatistics[i].onePs;
                awaytotalonePsMiss += res.data.awayTeamPlayerStatistics[i].onePsMiss;
                awaytotaltos += res.data.awayTeamPlayerStatistics[i].tos;
                awaytotalfouls += res.data.awayTeamPlayerStatistics[i].fouls;
                awaytotalfts += res.data.awayTeamPlayerStatistics[i].fts;
                awaytotalftsMiss += res.data.awayTeamPlayerStatistics[i].ftsMiss;
                awaytotaloff += res.data.awayTeamPlayerStatistics[i].off;
                awaytotaldef += res.data.awayTeamPlayerStatistics[i].def;
                awaytotaleff += res.data.awayTeamPlayerStatistics[i].eff;
              // }
            }
            this.totalpts = totalpts;
            this.totalrebs = totalrebs;
            this.totalasts = totalasts;
            this.totalstls = totalstls;
            this.totalblks = totalblks;
            this.totaltwoPs = totaltwoPs;
            this.totaltwoPsMiss = totaltwoPsMiss;
            this.totalthreePs = totalthreePs;
            this.totalthreePsMiss = totalthreePsMiss;
            this.totalonePs = totalonePs;
            this.totalonePsMiss = totalonePsMiss;
            this.totaltos = totaltos;
            this.totalfouls = totalfouls;
            this.totalfts = totalfts;
            this.totalftsMiss = totalftsMiss;
            this.totaloff = totaloff;
            this.totaldef = totaldef;
            this.totaleff = totaleff;
            this.awaytotalpts = awaytotalpts;
            this.awaytotalrebs = awaytotalrebs;
            this.awaytotalasts = awaytotalasts;
            this.awaytotalstls = awaytotalstls;
            this.awaytotalblks = awaytotalblks;
            this.awaytotaltwoPs = awaytotaltwoPs;
            this.awaytotaltwoPsMiss = awaytotaltwoPsMiss;
            this.awaytotalthreePs = awaytotalthreePs;
            this.awaytotalthreePsMiss = awaytotalthreePsMiss;
            this.awaytotalonePs = awaytotalonePs;
            this.awaytotalonePsMiss = awaytotalonePsMiss;
            this.awaytotaltos = awaytotaltos;
            this.awaytotalfouls = awaytotalfouls;
            this.awaytotalfts = awaytotalfts;
            this.awaytotalftsMiss = awaytotalftsMiss;
            this.awaytotaloff = awaytotaloff;
            this.awaytotaldef = awaytotaldef;
            this.awaytotaleff = awaytotaleff;
            this.homeTeamData = playerDataItem;
            this.awayTeamData = awayPlayerDataItem;
            this.teamInfoList[0].title = this.model == 5 ? (this.statisticalModel == 1 ? "二分" : "二分%") : (this.statisticalModel == 1 ? "一分" : "一分%"); // 一分%
            this.teamInfoList[0].leftTeamNum = this.model == 5 ? this.homeTeamData[this.typeHomeIndex].twoPs : this.homeTeamData[this.typeHomeIndex].onePs; // 二分%
            this.teamInfoList[0].rightTeamNum = this.model == 5 ?  this.awayTeamData[this.typeAwayIndex].twoPs : this.awayTeamData[this.typeAwayIndex].onePs; // 二分%
            this.teamInfoList[0].leftTeamAllNum = this.model == 5 ?  this.homeTeamData[this.typeHomeIndex].twoPs + this.homeTeamData[this.typeHomeIndex].twoPsMiss : this.homeTeamData[this.typeHomeIndex].onePs + this.homeTeamData[this.typeHomeIndex].onePsMiss; // 二分%
            this.teamInfoList[0].rightTeamAllNum = this.model == 5 ? this.awayTeamData[this.typeAwayIndex].twoPs + this.awayTeamData[this.typeAwayIndex].twoPsMiss : this.awayTeamData[this.typeAwayIndex].onePs + this.awayTeamData[this.typeAwayIndex].onePsMiss; // 二分%
            this.teamInfoList[1].title = this.model == 5 ? (this.statisticalModel == 1 ? "三分" : "三分%") : (this.statisticalModel == 1 ? "二分" : "二分%"); // 一分%
            this.teamInfoList[1].leftTeamNum = this.model == 5 ? this.homeTeamData[this.typeHomeIndex].threePs : this.homeTeamData[this.typeHomeIndex].twoPs; // 三分%
            this.teamInfoList[1].rightTeamNum = this.model == 5 ? this.awayTeamData[this.typeAwayIndex].threePs : this.awayTeamData[this.typeAwayIndex].twoPs; // 三分%
            this.teamInfoList[1].leftTeamAllNum = this.model == 5 ? this.homeTeamData[this.typeHomeIndex].threePs + this.homeTeamData[this.typeHomeIndex].threePsMiss : this.homeTeamData[this.typeHomeIndex].twoPs + this.homeTeamData[this.typeHomeIndex].twoPsMiss; // 三分%
            this.teamInfoList[1].rightTeamAllNum = this.model == 5 ? this.awayTeamData[this.typeAwayIndex].threePs + this.awayTeamData[this.typeAwayIndex].threePsMiss : this.awayTeamData[this.typeAwayIndex].twoPs + this.awayTeamData[this.typeAwayIndex].twoPsMiss; // 三分%
            this.teamInfoList[2].title = this.statisticalModel == 1 ? "罚球" : "罚球%"; // 一分%
            this.teamInfoList[2].leftTeamNum = this.homeTeamData[this.typeHomeIndex].fts; // 罚球%
            this.teamInfoList[2].rightTeamNum = this.awayTeamData[this.typeAwayIndex].fts; // 罚球%
            this.teamInfoList[2].leftTeamAllNum = this.homeTeamData[this.typeHomeIndex].fts + this.homeTeamData[this.typeHomeIndex].ftsMiss; // 罚球%
            this.teamInfoList[2].rightTeamAllNum = this.awayTeamData[this.typeAwayIndex].fts + this.awayTeamData[this.typeAwayIndex].ftsMiss; // 罚球%
            this.teamInfoList[3].leftTeamNum = this.homeTeamData[this.typeHomeIndex].rebs; // 篮板
            this.teamInfoList[3].rightTeamNum = this.awayTeamData[this.typeAwayIndex].rebs; // 篮板
            this.teamInfoList[3].leftTeamAllNum = this.totalrebs; // 篮板
            this.teamInfoList[3].rightTeamAllNum = this.awaytotalrebs; // 篮板
            this.teamInfoList[4].leftTeamNum = this.homeTeamData[this.typeHomeIndex].off; // 前板
            this.teamInfoList[4].rightTeamNum = this.awayTeamData[this.typeAwayIndex].off; // 前板
            this.teamInfoList[4].leftTeamAllNum = this.totaloff; // 前板
            this.teamInfoList[4].rightTeamAllNum = this.awaytotaloff; // 前板
            this.teamInfoList[5].leftTeamNum = this.homeTeamData[this.typeHomeIndex].def; // 后板
            this.teamInfoList[5].rightTeamNum = this.awayTeamData[this.typeAwayIndex].def; // 后板
            this.teamInfoList[5].leftTeamAllNum = this.totaldef; // 后板
            this.teamInfoList[5].rightTeamAllNum = this.awaytotaldef; // 后板
            this.teamInfoList[6].leftTeamNum = this.homeTeamData[this.typeHomeIndex].blks; // 盖帽
            this.teamInfoList[6].rightTeamNum = this.awayTeamData[this.typeAwayIndex].blks; // 盖帽
            this.teamInfoList[6].leftTeamAllNum = this.totalblks; // 盖帽
            this.teamInfoList[6].rightTeamAllNum = this.awaytotalblks; // 盖帽
            this.teamInfoList[7].leftTeamNum = this.homeTeamData[this.typeHomeIndex].asts; // 助攻
            this.teamInfoList[7].rightTeamNum = this.awayTeamData[this.typeAwayIndex].asts; // 助攻
            this.teamInfoList[7].leftTeamAllNum = this.totalasts; // 助攻
            this.teamInfoList[7].rightTeamAllNum = this.awaytotalasts; // 助攻
            this.teamInfoList[8].leftTeamNum = this.homeTeamData[this.typeHomeIndex].stls; // 抢断
            this.teamInfoList[8].rightTeamNum = this.awayTeamData[this.typeAwayIndex].stls; // 抢断
            this.teamInfoList[8].leftTeamAllNum = this.totalstls; // 抢断
            this.teamInfoList[8].rightTeamAllNum = this.awaytotalstls; // 抢断
            this.teamInfoList[9].leftTeamNum = this.homeTeamData[this.typeHomeIndex].tos; // 失误
            this.teamInfoList[9].rightTeamNum = this.awayTeamData[this.typeAwayIndex].tos; // 失误
            this.teamInfoList[9].leftTeamAllNum = this.totaltos; // 失误
            this.teamInfoList[9].rightTeamAllNum = this.awaytotaltos; // 失误
            this.teamInfoList[10].leftTeamNum = this.homeTeamData[this.typeHomeIndex].fouls; // 犯规
            this.teamInfoList[10].rightTeamNum = this.awayTeamData[this.typeAwayIndex].fouls; // 犯规
            this.teamInfoList[10].leftTeamAllNum = this.totalfouls; // 犯规
            this.teamInfoList[10].rightTeamAllNum = this.awaytotalfouls; // 犯规
            // this.teamInfoList[11].leftTeamNum = this.homeTeamData[this.typeHomeIndex].eff; // 效率
            // this.teamInfoList[11].rightTeamNum = this.awayTeamData[this.typeAwayIndex].eff; // 效率
            // this.teamInfoList[11].leftTeamAllNum = this.totaleff; // 效率
            // this.teamInfoList[11].rightTeamAllNum = this.awaytotaleff; // 效率
            this.homePlayerImg = this.homeTeamData[this.typeHomeIndex].face;
            this.awayPlayerImg = this.awayTeamData[this.typeAwayIndex].face;
            this.homePlayerName = this.homeTeamData[this.typeHomeIndex].playerName;
            this.awayPlayerName = this.awayTeamData[this.typeAwayIndex].playerName;
            this.$nextTick(() => {
              this.homeElementWidth = this.$refs.homeElement.offsetWidth;
              this.jiantouHomeElementWidth = this.$refs.jiantouHomeElement[0].offsetWidth;
              this.awayElementWidth = this.$refs.awayElement.offsetWidth;
              this.jiantouAwayElementWidth = this.$refs.jiantouAwayElement[0].offsetWidth;
            });
          } else {
            this.$toast(res.msg);
          }
        }).catch(e => {
          // console.log("e: ", e);
        });
      },
      getMatchList() {
        console.log("getMatchList");
      },
      goBackClick() {
        this.$router.back();
      },
      selectHomeClick(index) {
        this.typeHomeIndex = index;
        this.homePlayerImg = this.homeTeamData[this.typeHomeIndex].face;
        this.homePlayerName = this.homeTeamData[this.typeHomeIndex].playerName;
        this.teamInfoList[0].title = this.model == 5 ? (this.statisticalModel == 1 ? "二分" : "二分%") : (this.statisticalModel == 1 ? "一分" : "一分%"); // 一分%
        this.teamInfoList[0].leftTeamNum = this.model == 5 ? this.homeTeamData[this.typeHomeIndex].twoPs : this.homeTeamData[this.typeHomeIndex].onePs; // 二分%
        this.teamInfoList[0].rightTeamNum = this.model == 5 ?  this.awayTeamData[this.typeAwayIndex].twoPs : this.awayTeamData[this.typeAwayIndex].onePs; // 二分%
        this.teamInfoList[0].leftTeamAllNum = this.model == 5 ?  this.homeTeamData[this.typeHomeIndex].twoPs + this.homeTeamData[this.typeHomeIndex].twoPsMiss : this.homeTeamData[this.typeHomeIndex].onePs + this.homeTeamData[this.typeHomeIndex].onePsMiss; // 二分%
        this.teamInfoList[0].rightTeamAllNum = this.model == 5 ? this.awayTeamData[this.typeAwayIndex].twoPs + this.awayTeamData[this.typeAwayIndex].twoPsMiss : this.awayTeamData[this.typeAwayIndex].onePs + this.awayTeamData[this.typeAwayIndex].onePsMiss; // 二分%
        this.teamInfoList[1].title = this.model == 5 ? (this.statisticalModel == 1 ? "三分" : "三分%") : (this.statisticalModel == 1 ? "二分" : "二分%"); // 一分%
        this.teamInfoList[1].leftTeamNum = this.model == 5 ? this.homeTeamData[this.typeHomeIndex].threePs : this.homeTeamData[this.typeHomeIndex].twoPs; // 三分%
        this.teamInfoList[1].rightTeamNum = this.model == 5 ? this.awayTeamData[this.typeAwayIndex].threePs : this.awayTeamData[this.typeAwayIndex].twoPs; // 三分%
        this.teamInfoList[1].leftTeamAllNum = this.model == 5 ? this.homeTeamData[this.typeHomeIndex].threePs + this.homeTeamData[this.typeHomeIndex].threePsMiss : this.homeTeamData[this.typeHomeIndex].twoPs + this.homeTeamData[this.typeHomeIndex].twoPsMiss; // 三分%
        this.teamInfoList[1].rightTeamAllNum = this.model == 5 ? this.awayTeamData[this.typeAwayIndex].threePs + this.awayTeamData[this.typeAwayIndex].threePsMiss : this.awayTeamData[this.typeAwayIndex].twoPs + this.awayTeamData[this.typeAwayIndex].twoPsMiss; // 三分%
        this.teamInfoList[2].title = this.statisticalModel == 1 ? "罚球" : "罚球%"; // 一分%
        this.teamInfoList[2].leftTeamNum = this.homeTeamData[this.typeHomeIndex].fts; // 罚球%
        this.teamInfoList[2].rightTeamNum = this.awayTeamData[this.typeAwayIndex].fts; // 罚球%
        this.teamInfoList[2].leftTeamAllNum = this.homeTeamData[this.typeHomeIndex].fts + this.homeTeamData[this.typeHomeIndex].ftsMiss; // 罚球%
        this.teamInfoList[2].rightTeamAllNum = this.awayTeamData[this.typeAwayIndex].fts + this.awayTeamData[this.typeAwayIndex].ftsMiss; // 罚球%
        this.teamInfoList[3].leftTeamNum = this.homeTeamData[this.typeHomeIndex].rebs; // 篮板
        this.teamInfoList[3].rightTeamNum = this.awayTeamData[this.typeAwayIndex].rebs; // 篮板
        this.teamInfoList[3].leftTeamAllNum = this.totalrebs; // 篮板
        this.teamInfoList[3].rightTeamAllNum = this.awaytotalrebs; // 篮板
        this.teamInfoList[4].leftTeamNum = this.homeTeamData[this.typeHomeIndex].off; // 前板
        this.teamInfoList[4].rightTeamNum = this.awayTeamData[this.typeAwayIndex].off; // 前板
        this.teamInfoList[4].leftTeamAllNum = this.totaloff; // 前板
        this.teamInfoList[4].rightTeamAllNum = this.awaytotaloff; // 前板
        this.teamInfoList[5].leftTeamNum = this.homeTeamData[this.typeHomeIndex].def; // 后板
        this.teamInfoList[5].rightTeamNum = this.awayTeamData[this.typeAwayIndex].def; // 后板
        this.teamInfoList[5].leftTeamAllNum = this.totaldef; // 后板
        this.teamInfoList[5].rightTeamAllNum = this.awaytotaldef; // 后板
        this.teamInfoList[6].leftTeamNum = this.homeTeamData[this.typeHomeIndex].blks; // 盖帽
        this.teamInfoList[6].rightTeamNum = this.awayTeamData[this.typeAwayIndex].blks; // 盖帽
        this.teamInfoList[6].leftTeamAllNum = this.totalblks; // 盖帽
        this.teamInfoList[6].rightTeamAllNum = this.awaytotalblks; // 盖帽
        this.teamInfoList[7].leftTeamNum = this.homeTeamData[this.typeHomeIndex].asts; // 助攻
        this.teamInfoList[7].rightTeamNum = this.awayTeamData[this.typeAwayIndex].asts; // 助攻
        this.teamInfoList[7].leftTeamAllNum = this.totalasts; // 助攻
        this.teamInfoList[7].rightTeamAllNum = this.awaytotalasts; // 助攻
        this.teamInfoList[8].leftTeamNum = this.homeTeamData[this.typeHomeIndex].stls; // 抢断
        this.teamInfoList[8].rightTeamNum = this.awayTeamData[this.typeAwayIndex].stls; // 抢断
        this.teamInfoList[8].leftTeamAllNum = this.totalstls; // 抢断
        this.teamInfoList[8].rightTeamAllNum = this.awaytotalstls; // 抢断
        this.teamInfoList[9].leftTeamNum = this.homeTeamData[this.typeHomeIndex].tos; // 失误
        this.teamInfoList[9].rightTeamNum = this.awayTeamData[this.typeAwayIndex].tos; // 失误
        this.teamInfoList[9].leftTeamAllNum = this.totaltos; // 失误
        this.teamInfoList[9].rightTeamAllNum = this.awaytotaltos; // 失误
        this.teamInfoList[10].leftTeamNum = this.homeTeamData[this.typeHomeIndex].fouls; // 犯规
        this.teamInfoList[10].rightTeamNum = this.awayTeamData[this.typeAwayIndex].fouls; // 犯规
        this.teamInfoList[10].leftTeamAllNum = this.totalfouls; // 犯规
        this.teamInfoList[10].rightTeamAllNum = this.awaytotalfouls; // 犯规
        // this.teamInfoList[11].leftTeamNum = this.homeTeamData[this.typeHomeIndex].eff; // 效率
        // this.teamInfoList[11].rightTeamNum = this.awayTeamData[this.typeAwayIndex].eff; // 效率
        // this.teamInfoList[11].leftTeamAllNum = this.totaleff; // 效率
        // this.teamInfoList[11].rightTeamAllNum = this.awaytotaleff; // 效率
      },
      selectAwayClick(index) {
        this.typeAwayIndex = index;
        this.awayPlayerImg = this.awayTeamData[this.typeAwayIndex].face;
        this.awayPlayerName = this.awayTeamData[this.typeAwayIndex].playerName;
        this.teamInfoList[0].title = this.model == 5 ? (this.statisticalModel == 1 ? "二分" : "二分%") : (this.statisticalModel == 1 ? "一分" : "一分%"); // 一分%
        this.teamInfoList[0].leftTeamNum = this.model == 5 ? this.homeTeamData[this.typeHomeIndex].twoPs : this.homeTeamData[this.typeHomeIndex].onePs; // 二分%
        this.teamInfoList[0].rightTeamNum = this.model == 5 ?  this.awayTeamData[this.typeAwayIndex].twoPs : this.awayTeamData[this.typeAwayIndex].onePs; // 二分%
        this.teamInfoList[0].leftTeamAllNum = this.model == 5 ?  this.homeTeamData[this.typeHomeIndex].twoPs + this.homeTeamData[this.typeHomeIndex].twoPsMiss : this.homeTeamData[this.typeHomeIndex].onePs + this.homeTeamData[this.typeHomeIndex].onePsMiss; // 二分%
        this.teamInfoList[0].rightTeamAllNum = this.model == 5 ? this.awayTeamData[this.typeAwayIndex].twoPs + this.awayTeamData[this.typeAwayIndex].twoPsMiss : this.awayTeamData[this.typeAwayIndex].onePs + this.awayTeamData[this.typeAwayIndex].onePsMiss; // 二分%
        this.teamInfoList[1].title = this.model == 5 ? (this.statisticalModel == 1 ? "三分" : "三分%") : (this.statisticalModel == 1 ? "二分" : "二分%"); // 一分%
        this.teamInfoList[1].leftTeamNum = this.model == 5 ? this.homeTeamData[this.typeHomeIndex].threePs : this.homeTeamData[this.typeHomeIndex].twoPs; // 三分%
        this.teamInfoList[1].rightTeamNum = this.model == 5 ? this.awayTeamData[this.typeAwayIndex].threePs : this.awayTeamData[this.typeAwayIndex].twoPs; // 三分%
        this.teamInfoList[1].leftTeamAllNum = this.model == 5 ? this.homeTeamData[this.typeHomeIndex].threePs + this.homeTeamData[this.typeHomeIndex].threePsMiss : this.homeTeamData[this.typeHomeIndex].twoPs + this.homeTeamData[this.typeHomeIndex].twoPsMiss; // 三分%
        this.teamInfoList[1].rightTeamAllNum = this.model == 5 ? this.awayTeamData[this.typeAwayIndex].threePs + this.awayTeamData[this.typeAwayIndex].threePsMiss : this.awayTeamData[this.typeAwayIndex].twoPs + this.awayTeamData[this.typeAwayIndex].twoPsMiss; // 三分%
        this.teamInfoList[2].title = this.statisticalModel == 1 ? "罚球" : "罚球%"; // 一分%
        this.teamInfoList[2].leftTeamNum = this.homeTeamData[this.typeHomeIndex].fts; // 罚球%
        this.teamInfoList[2].rightTeamNum = this.awayTeamData[this.typeAwayIndex].fts; // 罚球%
        this.teamInfoList[2].leftTeamAllNum = this.homeTeamData[this.typeHomeIndex].fts + this.homeTeamData[this.typeHomeIndex].ftsMiss; // 罚球%
        this.teamInfoList[2].rightTeamAllNum = this.awayTeamData[this.typeAwayIndex].fts + this.awayTeamData[this.typeAwayIndex].ftsMiss; // 罚球%
        this.teamInfoList[3].leftTeamNum = this.homeTeamData[this.typeHomeIndex].rebs; // 篮板
        this.teamInfoList[3].rightTeamNum = this.awayTeamData[this.typeAwayIndex].rebs; // 篮板
        this.teamInfoList[3].leftTeamAllNum = this.totalrebs; // 篮板
        this.teamInfoList[3].rightTeamAllNum = this.awaytotalrebs; // 篮板
        this.teamInfoList[4].leftTeamNum = this.homeTeamData[this.typeHomeIndex].off; // 前板
        this.teamInfoList[4].rightTeamNum = this.awayTeamData[this.typeAwayIndex].off; // 前板
        this.teamInfoList[4].leftTeamAllNum = this.totaloff; // 前板
        this.teamInfoList[4].rightTeamAllNum = this.awaytotaloff; // 前板
        this.teamInfoList[5].leftTeamNum = this.homeTeamData[this.typeHomeIndex].def; // 后板
        this.teamInfoList[5].rightTeamNum = this.awayTeamData[this.typeAwayIndex].def; // 后板
        this.teamInfoList[5].leftTeamAllNum = this.totaldef; // 后板
        this.teamInfoList[5].rightTeamAllNum = this.awaytotaldef; // 后板
        this.teamInfoList[6].leftTeamNum = this.homeTeamData[this.typeHomeIndex].blks; // 盖帽
        this.teamInfoList[6].rightTeamNum = this.awayTeamData[this.typeAwayIndex].blks; // 盖帽
        this.teamInfoList[6].leftTeamAllNum = this.totalblks; // 盖帽
        this.teamInfoList[6].rightTeamAllNum = this.awaytotalblks; // 盖帽
        this.teamInfoList[7].leftTeamNum = this.homeTeamData[this.typeHomeIndex].asts; // 助攻
        this.teamInfoList[7].rightTeamNum = this.awayTeamData[this.typeAwayIndex].asts; // 助攻
        this.teamInfoList[7].leftTeamAllNum = this.totalasts; // 助攻
        this.teamInfoList[7].rightTeamAllNum = this.awaytotalasts; // 助攻
        this.teamInfoList[8].leftTeamNum = this.homeTeamData[this.typeHomeIndex].stls; // 抢断
        this.teamInfoList[8].rightTeamNum = this.awayTeamData[this.typeAwayIndex].stls; // 抢断
        this.teamInfoList[8].leftTeamAllNum = this.totalstls; // 抢断
        this.teamInfoList[8].rightTeamAllNum = this.awaytotalstls; // 抢断
        this.teamInfoList[9].leftTeamNum = this.homeTeamData[this.typeHomeIndex].tos; // 失误
        this.teamInfoList[9].rightTeamNum = this.awayTeamData[this.typeAwayIndex].tos; // 失误
        this.teamInfoList[9].leftTeamAllNum = this.totaltos; // 失误
        this.teamInfoList[9].rightTeamAllNum = this.awaytotaltos; // 失误
        this.teamInfoList[10].leftTeamNum = this.homeTeamData[this.typeHomeIndex].fouls; // 犯规
        this.teamInfoList[10].rightTeamNum = this.awayTeamData[this.typeAwayIndex].fouls; // 犯规
        this.teamInfoList[10].leftTeamAllNum = this.totalfouls; // 犯规
        this.teamInfoList[10].rightTeamAllNum = this.awaytotalfouls; // 犯规
        // this.teamInfoList[11].leftTeamNum = this.homeTeamData[this.typeHomeIndex].eff; // 效率
        // this.teamInfoList[11].rightTeamNum = this.awayTeamData[this.typeAwayIndex].eff; // 效率
        // this.teamInfoList[11].leftTeamAllNum = this.totaleff; // 效率
        // this.teamInfoList[11].rightTeamAllNum = this.awaytotaleff; // 效率
      }
    },
    activated () {
      window.document.title = '大屏比分';
      let matchId = localStorage.getItem("matchId");
      this.selectMatchVo(matchId);
      this.type = localStorage.getItem("type");
      let typeIndex = localStorage.getItem("typeIndex");
      if(this.type == "home") {
        this.typeHomeIndex = typeIndex;
      }
      if(this.type == "away") {
        this.typeAwayIndex = typeIndex;
      }
      this.$nextTick(() => {
        this.mainHeight = this.$refs.matchTitleElement.offsetHeight;
      });
      // setInterval(() => {
      //   this.getMatchList();
      // }, 2000);
    },
    deactivated() {
      this.typeHomeIndex = 4;
      this.typeAwayIndex = 4;
    }
  }
</script>

<style scoped>
  .home-index {
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
  }
  .match-title-main {
    width: 86%;
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
  }
  .match-title {
    font-family: SimHei;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.95);
  }
  .invisible-scrollbar::-webkit-scrollbar {
    /* display: none; */
  }
</style>
